const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
	transpileDependencies: true,
	

	// 代理
	devServer: {
		https: true,
		proxy: {
			'/baidu/oauth': {
				target: 'https://openapi.baidu.com/oauth/2.0/token',
				changeOrigin: true,
				pathRewrite: {
					'^/baidu/oauth': '',
				},
			},
			'/baidu/text2audio': {
				target: 'http://tsn.baidu.com/text2audio',
				changeOrigin: true,
				pathRewrite: {
					'^/baidu/text2audio': '',
				},
			},
			'/baidu/audio2text': {
				target: 'http://vop.baidu.com/server_api',
				changeOrigin: true,
				pathRewrite: {
					'^/baidu/audio2text': '',
				},
			},
		},
	},
})
